﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyMusicPlay._4._0
{
    public static class ListExtend
    {
        public static int GetMusicIndex(this List<Music> list, Music music)
        {
            for (int i = 0; i < list.Count; i++)
            {
                if (music.Name == list[i].Name && music.Singer == list[i].Singer)
                {
                    return i;
                }
            }
            return 0;
        }
    }
}
